package com.itc.system.domain.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itc.common.core.annotation.Excel;
import com.itc.common.core.validate.Add;
import com.itc.common.core.validate.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 字典类型表Dto
 * @TableName sys_dict_type
 */
@Data
public class SysDictTypeDto extends Page implements Serializable {
    /**
     * 字典主键
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "字典主键")
    @Excel(name = "字典主键", cellType = Excel.ColumnType.NUMERIC)
    @NotNull(message = "id不能为空",groups = {Update.class})
    private Long dictId;

    /**
     * 字典名称
     */
    @ApiModelProperty(value = "字典名称",required = true)
    @Excel(name = "字典名称")
    @NotBlank(message = "字典名称不能为空",groups = {Add.class})
    private String dictName;

    /**
     * 字典类型
     */
    @Excel(name = "字典类型")
    @NotBlank(message = "字典类型不能为空",groups = {Add.class})
    @ApiModelProperty(value = "字典类型",required = true)
    private String dictType;

    /**
     * 状态（0正常 1停用）
     */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    @ApiModelProperty(value = "状态（0正常 1停用）")
    private String status;

    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    private String createBy;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}